-
Notifications
You must be signed in to change notification settings - Fork 94
added TokenList::Stream class to wrap std::istream usage and implemented alternative C I/O version
#244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Still needs the unit tests to be adjusted to test both implementations as well as making it properly selectable in the standalone binary. This can possibly be introduced further by adding buffering to We could also add a |
dff9b46 to
4193e57
Compare
791e5b1 to
1781870
Compare
|
Turns out it's just a bug in my code with |
5fb149d to
1e8ee57
Compare
|
I backed out the test changes and will merge them into #261 so they don't get lost. |
|
Testing with
Testing with
|
bbeb171 to
23217fc
Compare
|
reducing the Ir count by using C I/O sounds good to me. |
…ntation-specific parts into StdIStream
…uses C I/O functions
… interface in reading initial file
…ome barebones documentation
|
I put this into Cppcheck with the current and added |
Reading the file via
std::istreamincludes a considerable overhead caused bystd::istream::sentryand others. Using C I/O instead reduces the "total Ir" usage by about 10%.Testing with-q -Ilib/ -D__GNUC__ lib/valueflow.cpp:Clang 13271,013,439->269,398,283->244,353,123GCC 11->-> ``The intermediate value shows the improvement if we only change the actual input file. The last value if we also do it for all the includes which does not require you to use the new interface function. So we even if you do not change the application which uses this it would still result in a sizable improvement.